const path = require('path');
const webpack = require('webpack');
// vue.config.js
module.exports = {
  // 选项...
  devServer: {
    host: '0.0.0.0',
    port: 5000
  },
  configureWebpack: (config) => {
    if (process.env.NODE_ENV === 'production') {
      // 为生产环境修改配置...
      config.mode = 'production';
    } else {
      // 为开发环境修改配置...
      config.mode = 'development';
    }
    Object.assign(config, {
      // 开发生产共同配置
      resolve: {
        extensions: ['.js', '.vue', '.json'],
        alias: {
          '@': path.resolve(__dirname, './src'),
          '@c': path.resolve(__dirname, './src/components'),
          '@s': path.resolve(__dirname, './static')
        }
      }
    });
  },
  lintOnSave: true
}
;
